from odoo import models, fields, api, _


class HostelAmenities(models.Model):
    _name = 'hostel.amenities'
    _description = 'Hostel Amenities'
    _rec_name = 'name'

    name = fields.Char(string="Amenity Name", required=True)
    active = fields.Boolean(string="Active", default=True, 
                           help="启用/禁用该设施是否应提供")
    description = fields.Text(string="Description")
    
    # 关联到房间
    room_ids = fields.Many2many('hostel.room', 'hostel_room_amenities_rel', 
                               'amenity_id', 'room_id', string="Rooms")
